ThienTanDateField = Ext.extend(Ext.form.DateField, {
//	autoCreate: {
//        tag: 'input', type: 'text', size: '10',
//        autocomplete: 'off', maxlength: '6'},
	maskRe : /^\d{0,5}$/,
	format: 'd-m-Y',
	selectOnFocus : true,
	validateOnBlur : false,
	plugins : new CustomizedFieldPlugin(),
	
	beforeBlur: function () {
    	var raw = this.getRawValue(),
    	match = raw.match(/^\s*(\d{2})(\d{2})(\d{2})\s*$/);
    	
    	if (match){
    		raw = match[2] + match[1] + match[3];
    	}
    	this.setRawValue(raw);
    },
    
    postBlur : function() {
    	this.clearInvalid();
    	var value = this.getValue();
    	this.setValue(Utility.autoCompleteDateValue(value));
    },
    
    validator : function(){
		var value = this.getValue();
		if ((!this.allowBlank && (value == null || value == "")) || value > new Date()) {
			return lang.msg.invalidNgayBan
		}
		return true
	}
});